// User Interface ------------------------------------------------------------
// This file can be expanded to handle all the user interface properties as
// they become available in browsers:
// http://www.w3.org/TR/2000/WD-css3-userint-20000216
@import "shared";

// ----------------------------------------------------------------------------
// @private css3-feature-support variables must always include a list of five boolean values
// representing in order: -moz, -webkit, -o, -ms, -khtml
//   - mozilla support handled seperately below
$userselect-support: not -moz, -webkit, not -o, -ms, -khtml;

// ----------------------------------------------------------------------------
// Mixins

// This property controls the selection model and granularity of an element.
//
// @param $select
//   [ none | text | toggle | element | elements | all | inherit ]
@mixin user-select($select) {
  $select: unquote($select);

  @if $experimental-support-for-mozilla {
    -moz-user-select: if($select == 'none', -moz-none, $select);
  }
  @include experimental(user-select, $select, $userselect-support...);
}

// Style the html5 input placeholder in browsers that support it.
//
// There are two usage modes: at the stylesheet root, include the mixin with
// styles passed as mixin content. This applies to all elements. For example:
//
//     @include input-placeholder {
//       color: #bfbfbf;
//       font-style: italic;
//     }
//
// If a specific element is being styled, pass "&" as an argument to the mixin
// as well. For example:
//
//     .textinput {
//       @include input-placeholder("&") {
//         color: #bfbfbf;
//         font-style: italic;
//       }
//     }
@mixin input-placeholder($selector: "") {
  @if $experimental-support-for-webkit {
    #{$selector}::-webkit-input-placeholder { @content; }
  }
  @if $experimental-support-for-mozilla {
    #{$selector}:-moz-placeholder { @content; }
  }
  @if $experimental-support-for-microsoft {
    #{$selector}:-ms-input-placeholder { @content; }
  }
}
